package nosqlconnect.menuActions;

import nosqlconnect.connection.Connection;

import org.eclipse.jface.action.Action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;

public class MEditConnectionAction extends Action implements IWorkbenchAction{

	private Connection selectedConnection = null;
	
	public MEditConnectionAction(){
		setText("Edit");
		setToolTipText("Edit connection");	
	}
	
	@Override
	public void dispose() {
		
	}

	public void run(){
		
		if (null == selectedConnection){
		}
		else {
			//TODO Add handler for editing
		}

	}

	public Connection getSelectedConnection() {
		return selectedConnection;
	}

	public void setSelectedConnection(Connection selectedConnection) {
		this.selectedConnection = selectedConnection;
	}
	
	
}
